package top.lixunda.ecommerce.server.user.api.entity.db;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author Xumda
 * @since 2020-04-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("business_task_item")
public class BusinessTaskItemDO extends Model<BusinessTaskItemDO> {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "task_item_id", type = IdType.AUTO)
    private Integer taskItemId;

    /**
     * 任务id
     */
    @TableField("task_id")
    private Integer taskId;

    /**
     * 执行任务人员编号
     */
    @TableField("task_user_id")
    private Integer taskUserId;

    /**
     * 执行任务人员类型
     */
    @TableField("task_user_type")
    private String taskUserType;

    /**
     * 执行任务人员名称
     */
    @TableField("task_user_name")
    private String taskUserName;

    /**
     * 任务分配时间
     */
    @TableField("task_time")
    private LocalDateTime taskTime;

    /**
     * 催办定时任务id
     */
    @TableField("urge_id")
    private Integer urgeId;

    /**
     * 消费标志，任务是否完成
     */
    @TableField("consume_flag")
    private Integer consumeFlag;

    /**
     * 消费时间
     */
    @TableField("consume_time")
    private LocalDateTime consumeTime;

    /**
     * 逻辑删除
     */
    @TableLogic
    @JsonIgnore
    @TableField("usable")
    private Integer usable;

    /**
     * 任务状态，正常，取消，完成，异常
     */
    @TableField("state")
    private String state;

    /**
     * 备注，取消原因，异常原因
     */
    @TableField("remark")
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.taskItemId;
    }

}
